<?php
/**
 *
 * (model)
 */
namespace App\Models\SalesReportLT;

use Illuminate\Database\Eloquent\Model;

class PaymentTNSummary extends Model
{
    protected $table = 'lt_sr_payment_none';

    protected $guarded = [];

    public $timestamps = false;

    public static function headersField(): array
    {
        return PaymentCNSummary::$_common;
    }
    //数值+占比
    public static function getDownloadData($re): \Generator
    {
        foreach ($re as $row){
            yield PaymentCNSummary::getNumDataCommon($row);
            yield PaymentCNSummary::getPerDataCommon($row);
        }
    }
    //数值
    public static function getDownloadNumData($re): \Generator
    {
        foreach ($re as $row){
            yield PaymentCNSummary::getNumDataCommon($row);
        }
    }
    //占比
    public static function getDownloadPerData($re): \Generator
    {
        foreach ($re as $row){
            yield PaymentCNSummary::getPerDataCommon($row);
        }
    }
}
